package a1;

import java.awt.GridLayout;
import java.io.IOException;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;

public class AboutGrayscale extends JFrame {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 6830573939543618199L;

	public AboutGrayscale() throws IOException {
		super("About Grayscale");
		this.setLayout(new GridLayout(4,2));
		
		JLabel origImage = new JLabel(new ImageIcon(getClass().getResource("/orig.png")));
		
		JLabel avgImage = new JLabel(new ImageIcon(getClass().getResource("/grayscaleAvg.png")));
		
		JLabel lightImage = new JLabel(new ImageIcon(getClass().getResource("/grayscaleLight.png")));
		
		JLabel lumImage = new JLabel(new ImageIcon(getClass().getResource("/grayscaleLum.png")));
		//ImageIcon lumIcon = new ImageIcon(getClass().getResource("/grayscaleLum.png"));
		//origImage.setIcon(lumIcon);
		
		JLabel origText = new JLabel("Original: ");
		JLabel avgText = new JLabel("Average: ");
		JLabel lightText = new JLabel("Lightness: ");
		JLabel lumText = new JLabel("Luminosity: ");
		
		this.add(origText);
		this.add(origImage);
		
		this.add(avgText);
		this.add(avgImage);
		
		this.add(lightText);
		this.add(lightImage);
		
		this.add(lumText);
		this.add(lumImage);
		
		this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
		this.pack();
	}

}
